﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using CYTS.Aoyou.Framework.Config;

namespace CYTS.Aoyou.Framework.Service
{
    public class ServiceHostConfig : ConfigUnit
    {
        public List<WCFServiceHost> WCFServiceHosts { get; set; }
    }

    public class WCFServiceHost
    {
        [XmlAttribute(AttributeName = "serviceName")]
        public string ServiceName { get; set; }

        [XmlAttribute(AttributeName = "baseAddress")]
        public string BaseAddress { get; set; }

        public List<ServiceEndpoint> Endpoints { get; set; }
    }

    public class ServiceEndpoint
    {
        [XmlAttribute(AttributeName = "category")]
        public ServiceCategory Category { get; set; }

        [XmlAttribute(AttributeName = "relativeAddress")]
        public string Address { get; set; }
    }
}
